package swing.java2d;

import java.util.Comparator;


public class Poker implements Comparable<Poker>  {
	
	int type;  //花色
	int num;   //数字
	
	public Poker(int type,int num){
		this.type=type;
		this.num=num;
	} 

	public String toString() {
		 return num+"";
	}

	@Override
	public int compareTo(Poker o) {
		return this.num-o.num;
	} 
	 
	 
}
